package org.ideo.action;

import javax.servlet.http.HttpServletRequest;

import org.apache.struts2.config.Result;
import org.apache.struts2.dispatcher.ServletDispatcherResult;
import org.apache.struts2.interceptor.ServletRequestAware;

@Result(name="success", type=ServletDispatcherResult.class, value="Welcome.jsp")
public class LogoutAction implements ServletRequestAware {
    private HttpServletRequest request;
    
    public String execute() throws Exception {
    	request.getSession(true).removeAttribute("user");        	
    	return "success";
    }

    public void setServletRequest(HttpServletRequest httpServletRequest) {
    	request = httpServletRequest;
    }
}
